# include "COOmatrix.H"

using namespace std;
using namespace mg::numeric::algebra ;

int main() {


   COOmatrix<double> com1 = {{1.01, 0 , 0,0}, {0, 4.07, 0,0},{0,0,6.08,0},{1.06,0,2.2,9.9} }; 
  
   com1.print();

   cout << "----------------------------------------------------------" << endl;   

   COOmatrix<double> com2= 
                           {{6, 0, 9, 0, 0, 4, 0, 0},
                            {0, 0, 0, 0, 0, 4, 0, 0},
                            {0, 5, 0, 0, 0, 0, 0, 0},
                            {0, 0, 3, 5, 8, 0, 0, 0},
                            {0, 0, 0, 0, 6, 0, 0, 0},
                            {0, 0, 0, 0, 0, 5, 0, 0},
                            {0, 0, 0, 0, 0, 4, 3, 0},
                            {0, 0, 0, 0, 0, 0, 2, 2}  
                           };
   com2.print();

   cout << "----------------------------------------------------------" << endl;   
   COOmatrix<double> com3("input20.dat");   
   cout << "----------------------------------------------------------" << endl;   
   
   com3.print();

   cout << "----------------------------------------------------------" << endl;   
   COOmatrix<double> com4("coo_matrix.mtx");  
   cout << com4;
    
   cout << "----------------------------------------------------------" << endl;   
   COOmatrix<int> com5 =  {{11,12,0,0,0,0,0,0} ,{0,22,0,0,0,0,0,0} ,{31,32,33,0,0,0,0,0},
           {41,42,43,44,0,0,0,0}, {0,0,0,0,55,56,0,0},{0,0,0,0,0,66,67,0},{0,0,0,0,0,0,77,78},{0,0,0,0,0,0,87,88}};
   
   cout << com5 ;   
   cout << "----------------------------------------------------------" << endl;   
   std::vector<int> v1 =  {3,4,0,1,6,8,1,19};    
   std::vector<int> v2 =  com5*v1 ;
   
   for(auto& x : v2 )
      cout << x << ' ' ;
   std::cout << endl;   
   cout << "----------------------------------------------------------" << endl;   
   COOmatrix<double> com6("input21.dat");    
      
   cout << com6 ;   


  return 0;
}


